package kyssion.leetcode.num101_150;

import kyssion.leetcode.util.TreeNode;

public class code104_二叉树的最大深度 {
    public static void main(String[] args) {

    }

    public int maxDepth(TreeNode root) {
        if (root == null) {
            return 0;
        } else {
            return Math.max(maxDepth(root.left) + 1, maxDepth(root.right) + 1);
        }
    }
}
